/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.GUI;

import ac.lib.data.dateTime;
import ac.settings.sqlQuerys;
import ac.ui.controls.PCLPanel;
import ac.ui.custemItmes;
import ac.uitls.propertiesOperation;
import java.util.Date;

/**
 *
 * @author ismail
 */
public class home extends PCLPanel implements sqlQuerys {

    ac.engin.home h = new ac.engin.home();

    /**
     * Creates new form home
     */
    public home() {

        initComponents();
        onLoad();
        propertiesOperation po = new propertiesOperation();

        jp_users.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.usersInfo")));
        jp_lastmoves.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.lastmovesInfo")));

        jp_messages1.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.messages")));

        jp_sysmessages.setBorder(javax.swing.BorderFactory.createTitledBorder(po.getWord("label.systemMessages")));

        jp_mnyTimes.setBorder(
                javax.swing.BorderFactory.createTitledBorder(po.getWord("label.mnyTimes") + " " + ac.lib.data.dateTime.now("date")
                ));
jm_installpay.setText(po.getWord("label.installmentPay"));
        updateInstallment();
    }

    public void updateInstallment() {
        ;
        h.serachTabel = jtb_Installment;

      
        
        
        
        
        
        
        String w = SQL_installmentHome + " where installment_items.status=0 and  " + dateTime.updateSerechLessDate("installment_items.date", "<=", new Date());
        h.indexsearch(w);
    
    
    
    
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pCLpopupMenu1 = new ac.ui.controls.PCLpopupMenu();
        jm_installpay = new javax.swing.JMenuItem();
        pCLTabs1 = new ac.ui.controls.PCLTabs();
        pCLPanel1 = new ac.ui.controls.PCLPanel();
        jp_users = new ac.ui.controls.PCLPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtb_users = new ac.ui.controls.PCLTable();
        jp_lastmoves = new ac.ui.controls.PCLPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jtb_lastmoves = new ac.ui.controls.PCLTable();
        jp_sysmessages = new ac.ui.controls.PCLPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtb_sysMessages = new ac.ui.controls.PCLTable();
        jp_mnyTimes = new ac.ui.controls.PCLPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtb_Installment = new ac.ui.controls.PCLTable();
        jp_messages1 = new ac.ui.controls.PCLPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jtb_sysmessages = new ac.ui.controls.PCLTable();

        jm_installpay.setText("jMenuItem1");
        jm_installpay.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jm_installpayActionPerformed(evt);
            }
        });
        pCLpopupMenu1.add(jm_installpay);

        pCLTabs1.setTabPlacement(javax.swing.JTabbedPane.RIGHT);

        jp_users.setBorder(javax.swing.BorderFactory.createTitledBorder("sfdsfdsf"));

        jtb_users.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane3.setViewportView(jtb_users);

        javax.swing.GroupLayout jp_usersLayout = new javax.swing.GroupLayout(jp_users);
        jp_users.setLayout(jp_usersLayout);
        jp_usersLayout.setHorizontalGroup(
            jp_usersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_usersLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jp_usersLayout.setVerticalGroup(
            jp_usersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_usersLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)
                .addContainerGap())
        );

        jp_lastmoves.setBorder(javax.swing.BorderFactory.createTitledBorder("fsdfsdfsdfsdf"));

        jtb_lastmoves.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jtb_lastmoves.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane4.setViewportView(jtb_lastmoves);

        javax.swing.GroupLayout jp_lastmovesLayout = new javax.swing.GroupLayout(jp_lastmoves);
        jp_lastmoves.setLayout(jp_lastmovesLayout);
        jp_lastmovesLayout.setHorizontalGroup(
            jp_lastmovesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_lastmovesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jp_lastmovesLayout.setVerticalGroup(
            jp_lastmovesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_lastmovesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );

        jp_sysmessages.setBorder(javax.swing.BorderFactory.createTitledBorder("sdfsdfsdf"));

        jtb_sysMessages.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane2.setViewportView(jtb_sysMessages);

        javax.swing.GroupLayout jp_sysmessagesLayout = new javax.swing.GroupLayout(jp_sysmessages);
        jp_sysmessages.setLayout(jp_sysmessagesLayout);
        jp_sysmessagesLayout.setHorizontalGroup(
            jp_sysmessagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_sysmessagesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2)
                .addContainerGap())
        );
        jp_sysmessagesLayout.setVerticalGroup(
            jp_sysmessagesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_sysmessagesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                .addContainerGap())
        );

        jp_mnyTimes.setBorder(javax.swing.BorderFactory.createTitledBorder("sdfsdfdsf"));

        jtb_Installment.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Title 1"
            }
        ));
        jtb_Installment.setAlignmentX(0.1F);
        jtb_Installment.setAlignmentY(0.1F);
        jtb_Installment.setComponentPopupMenu(pCLpopupMenu1);
        jScrollPane1.setViewportView(jtb_Installment);

        javax.swing.GroupLayout jp_mnyTimesLayout = new javax.swing.GroupLayout(jp_mnyTimes);
        jp_mnyTimes.setLayout(jp_mnyTimesLayout);
        jp_mnyTimesLayout.setHorizontalGroup(
            jp_mnyTimesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_mnyTimesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        jp_mnyTimesLayout.setVerticalGroup(
            jp_mnyTimesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_mnyTimesLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                .addContainerGap())
        );

        jp_messages1.setBorder(javax.swing.BorderFactory.createTitledBorder("sdfsdfsdf"));

        jtb_sysmessages.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane5.setViewportView(jtb_sysmessages);

        javax.swing.GroupLayout jp_messages1Layout = new javax.swing.GroupLayout(jp_messages1);
        jp_messages1.setLayout(jp_messages1Layout);
        jp_messages1Layout.setHorizontalGroup(
            jp_messages1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_messages1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 654, Short.MAX_VALUE)
                .addContainerGap())
        );
        jp_messages1Layout.setVerticalGroup(
            jp_messages1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jp_messages1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout pCLPanel1Layout = new javax.swing.GroupLayout(pCLPanel1);
        pCLPanel1.setLayout(pCLPanel1Layout);
        pCLPanel1Layout.setHorizontalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jp_mnyTimes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(pCLPanel1Layout.createSequentialGroup()
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jp_lastmoves, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jp_users, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jp_messages1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jp_sysmessages, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pCLPanel1Layout.setVerticalGroup(
            pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCLPanel1Layout.createSequentialGroup()
                .addGroup(pCLPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jp_users, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jp_lastmoves, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jp_messages1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jp_sysmessages, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jp_mnyTimes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pCLTabs1.addTab("tab1", pCLPanel1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLTabs1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCLTabs1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
    }// </editor-fold>//GEN-END:initComponents
ac.engin.treasury.Installment i = new ac.engin.treasury.Installment();
    private void jm_installpayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jm_installpayActionPerformed
       
        
        
        i.installPay(jtb_Installment.getValue());
        
        
        
        
        
        
    }//GEN-LAST:event_jm_installpayActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JMenuItem jm_installpay;
    private ac.ui.controls.PCLPanel jp_lastmoves;
    private ac.ui.controls.PCLPanel jp_messages1;
    private ac.ui.controls.PCLPanel jp_mnyTimes;
    private ac.ui.controls.PCLPanel jp_sysmessages;
    private ac.ui.controls.PCLPanel jp_users;
    private ac.ui.controls.PCLTable jtb_Installment;
    private ac.ui.controls.PCLTable jtb_lastmoves;
    private ac.ui.controls.PCLTable jtb_sysMessages;
    private ac.ui.controls.PCLTable jtb_sysmessages;
    private ac.ui.controls.PCLTable jtb_users;
    private ac.ui.controls.PCLPanel pCLPanel1;
    private ac.ui.controls.PCLTabs pCLTabs1;
    private ac.ui.controls.PCLpopupMenu pCLpopupMenu1;
    // End of variables declaration//GEN-END:variables
}
